feat: enable debug-embed on rust-embed for dev-mode builds#25
Open
ecalifornica wants to merge 1 commit intoempathic:mainfrom
Open
feat: enable debug-embed on rust-embed for dev-mode builds#25ecalifornica wants to merge 1 commit intoempathic:mainfrom
ecalifornica wants to merge 1 commit intoempathic:mainfrom
Conversation
rust-embed reads files from disk at runtime in debug builds and only embeds in release. `cargo build -p workshop --features embedded-ui` and fastbuild Bazel images both produce binaries that can't find the embedded paths at runtime. debug-embed forces embedding in every mode.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Enables the
debug-embedfeature onrust-embedso theembedded-uicrate bakes the SvelteKit bundle into the binary in all build modes, not just release.rust-embeddefaults to reading files from disk at runtime in debug builds and only embeds in release. That meanscargo build -p workshop --features embedded-uiand fastbuild Bazel images produce binaries whose UI assets point at compile-time paths that don't exist at runtime in the container.debug-embedforces embedding regardless of build mode.debug-embeddebug-embed(this PR)Tradeoff
If you edit SvelteKit source while rebuilding an
embedded-uibinary in fastbuild,rust-embedre-runs andworkshop_ui_craterecompiles. The UI dev loop (pnpm dev+ non-embedded-uibinary) isn't affected.